import 'package:flutter/material.dart';

class ScrollbarApp extends StatefulWidget{

  @override
  Widget build(BuildContext context) {

  }

  @override
  State<StatefulWidget> createState() {
    return _MyState();
  }

}

class _MyState extends State<ScrollbarApp>{
  ScrollController _scrollController=ScrollController();
  
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('滚动条'),
      ),
      body: Scrollbar(//显示滚动条
        child: Container(
          width: double.maxFinite,
          child: SingleChildScrollView(
            controller: _scrollController,
            child: Column(
              children: <Widget>[
                SizedBox(
                  height: 300,
                  child: Text('111'),
                ),
                SizedBox(
                  height: 300,
                  child: Text('111'),
                ),
                SizedBox(
                  height: 300,
                  child: Text('111'),
                ),
                SizedBox(
                  height: 300,
                  child: Text('111'),
                ),
                SizedBox(
                  height: 300,
                  child: Text('111'),
                ),
                SizedBox(
                  height: 300,
                  child: Text('111'),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }

}